import request from "../../http";
const moneyApi = {
  // platform
  async getFinanceData(query) {
    return request({
      url: "/api/billing/withdrawal/list",
      method: "get",
      params: query
    });
  },
  async queryFinanceData(query) {
    return request({
      url: "/api/billing/withdrawal/list",
      method: "get",
      params: query
    });
  },
  async getSupplierData(query) {
    return request({
      url: "/api/billing/platform/list",
      method: "get",
      params: query
    });
  },
  async querySupplierData(query) {
    return request({
      url: "/api/billing/platform/list",
      method: "get",
      params: query
    });
  },
  async getSubSidiesData(query) {
    return request({
      url: "/api/billing/subsidies/list",
      method: "get",
      params: query
    });
  },
  async querySubSidiesData(query) {
    return request({
      url: "/api/billing/subsidies/list",
      method: "get",
      params: query
    });
  },
  async getDetailData(id) {
    return request({
      url: `/api/billing/${id}`,
      method: "get"
    });
  },
  // 资金总览
  async getMoneyData() {
    return request({
      url: "/api/billing/main",
      method: "get"
    });
  },
  async getTableData(query) {
    return request({
      url: "/api/billing/main/time",
      method: "get",
      params: query
    });
  },
  async getSupplierBank(query) {
    return request({
      url: "/api/supplier/bank",
      method: "get",
      params: query
    });
  },
  async withdrawal(params) {
    return request({
      url: "/api/billing/amount",
      method: "post",
      data: params
    });
  },
  async platformApproval(params) {
    return request({
      url: "/api/billing/approve",
      method: "post",
      data: params
    });
  },
  async payMent(params) {
    return request({
      url: "/api/billing/payAmount",
      method: "post",
      data: params
    });
  },
  async getSubsidiesdetail(orderId) {
    return request({
      url: `/api/billing/subsidies/${orderId}`,
      method: "get"
    });
  }
};

export default moneyApi;
